package com.example.design.observer;

import lombok.extern.log4j.Log4j2;

import java.util.Observable;
import java.util.Observer;

public class Student implements Observer {
    private String name;

    public Student(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        System.out.println(name + "同学快跑," + arg + "老师要来了!");
    }
}
